package main

import (
    "net/http"
    "log"  
    "fmt"
)

func myHandler(w http.ResponseWriter, r *http.Request) {
    w.Header().Set("Access-Control-Allow-Origin", "*")
    fmt.Fprintf(w, "Hello front-back-demo!\n")
}

func main(){
    http.HandleFunc("/", myHandler)		//	设置访问路由
    log.Fatal(http.ListenAndServe(":8080", nil))
}
